Component({
    data: {
        selected: 2,
        tabbarMap: {
            square: {
                path: '/pages/index/index',
            },
            clock: {
                path: '/pages/clock/clock',
            },
            mine: {
                path: '/pages/mine/mine',
            },
        },
        tabbarHeight: 750 / my.getSystemInfoSync().pixelRatio * 0.35,
    },
    methods: {
        onChangeActive(e) {
            const name = e.target.dataset.name
            my.switchTab({
                url: this.data.tabbarMap[name].path,
            })
        },
    },
})
